package com.kitwee.serialport.decoder.mitsubishi;


import com.kitwee.serialport.decoder.InstructionDecoder;

public class FX3SInstructionToFloatDecoder extends InstructionDecoder {

	/**
	 * source为32位，前16位代表生产速度D100, 后16位代表生产产量D101
	 */
	@Override
	public synchronized Object decode(byte[] source) {
		if(source.length != 32){
			return 0;
		}
		byte[] tempByte = new byte[16];
		System.arraycopy(source, 0, tempByte, 15, tempByte.length);

		return byteArray2int(tempByte);
	}

}
